package com.beta.admin.controller;

import com.beta.admin.support.web.BaseController;
import com.beta.common.web.ContentType;
import com.beta.service.IAdminRolesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by lichao on 2017/1/6.
 */
@RestController
@RequestMapping(value = RequestMappingConstants.MAPPING_PREFIX + "/roles")
public class RolesController extends BaseController {
    @Autowired
    private IAdminRolesService adminRolesService;
    @GetMapping(value = "", produces = {ContentType.JSON})
    public Object getRoles(){
        return ok(adminRolesService.getAdminRoles());
    }
}
